<?php

namespace app\model;

use think\Model;

class Admin extends Model
{
    /**
     * Use Thinkphp ORM Model
     */

    protected $autoWriteTimestamp = 'int';


    public static function getAdminInfo($where = [])
    {
        return self::alias('a')
            ->join('auth_group g', 'a.group_id = g.id')
            ->where($where)
            ->field('a.*,g.name as group_name,g.rules')
            ->findOrEmpty()->toArray();
    }
}